.class public final Lnet/tsapps/topdeals/b/k;
.super Landroid/app/Dialog;

# interfaces
.implements Landroid/view/View$OnClickListener;


# static fields
.field public static a:I


# instance fields
.field private b:Landroid/widget/Button;

.field private c:Lnet/tsapps/topdeals/a/f;

.field private d:Ljava/util/List;

.field private e:Landroid/content/DialogInterface$OnClickListener;

.field private f:Lnet/tsapps/topdeals/e/b;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x1

    sput v0, Lnet/tsapps/topdeals/b/k;->a:I

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/util/List;Lnet/tsapps/topdeals/e/b;Landroid/content/DialogInterface$OnClickListener;)V
    .locals 3

    invoke-direct {p0, p1}, Landroid/app/Dialog;-><init>(Landroid/content/Context;)V

    iput-object p4, p0, Lnet/tsapps/topdeals/b/k;->e:Landroid/content/DialogInterface$OnClickListener;

    iput-object p2, p0, Lnet/tsapps/topdeals/b/k;->d:Ljava/util/List;

    iput-object p3, p0, Lnet/tsapps/topdeals/b/k;->f:Lnet/tsapps/topdeals/e/b;

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/k;->requestWindowFeature(I)Z

    const v0, 0x7f030008

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/k;->setContentView(I)V

    const v0, 0x7f050026

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/k;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ExpandableListView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->setGroupIndicator(Landroid/graphics/drawable/Drawable;)V

    new-instance v2, Lnet/tsapps/topdeals/a/f;

    const-string v1, "layout_inflater"

    invoke-virtual {p1, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/view/LayoutInflater;

    invoke-direct {v2, v1, p2}, Lnet/tsapps/topdeals/a/f;-><init>(Landroid/view/LayoutInflater;Ljava/util/List;)V

    iput-object v2, p0, Lnet/tsapps/topdeals/b/k;->c:Lnet/tsapps/topdeals/a/f;

    iget-object v1, p0, Lnet/tsapps/topdeals/b/k;->c:Lnet/tsapps/topdeals/a/f;

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->setAdapter(Landroid/widget/ExpandableListAdapter;)V

    new-instance v1, Lnet/tsapps/topdeals/b/i;

    invoke-direct {v1, p0}, Lnet/tsapps/topdeals/b/i;-><init>(Lnet/tsapps/topdeals/b/k;)V

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->setOnChildClickListener(Landroid/widget/ExpandableListView$OnChildClickListener;)V

    const v0, 0x7f050021

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/k;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lnet/tsapps/topdeals/b/k;->b:Landroid/widget/Button;

    iget-object v0, p0, Lnet/tsapps/topdeals/b/k;->b:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method


# virtual methods
.method public final a()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/b/k;->f:Lnet/tsapps/topdeals/e/b;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/e/b;->a()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected final a(J)V
    .locals 6

    const/4 v1, 0x0

    iget-object v0, p0, Lnet/tsapps/topdeals/b/k;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_2

    if-eqz v1, :cond_1

    iget-object v0, p0, Lnet/tsapps/topdeals/b/k;->f:Lnet/tsapps/topdeals/e/b;

    invoke-virtual {v0, v1}, Lnet/tsapps/topdeals/e/b;->b(Lnet/tsapps/topdeals/objects/Location;)V

    :cond_1
    iget-object v0, p0, Lnet/tsapps/topdeals/b/k;->e:Landroid/content/DialogInterface$OnClickListener;

    sget v1, Lnet/tsapps/topdeals/b/k;->a:I

    invoke-interface {v0, p0, v1}, Landroid/content/DialogInterface$OnClickListener;->onClick(Landroid/content/DialogInterface;I)V

    invoke-virtual {p0}, Lnet/tsapps/topdeals/b/k;->dismiss()V

    return-void

    :cond_2
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Region;

    iget-object v0, v0, Lnet/tsapps/topdeals/objects/Region;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :cond_3
    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Location;

    iget-wide v4, v0, Lnet/tsapps/topdeals/objects/Location;->a:J

    cmp-long v4, v4, p1

    if-nez v4, :cond_3

    move-object v1, v0

    goto :goto_0
.end method

.method public final onClick(Landroid/view/View;)V
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/b/k;->b:Landroid/widget/Button;

    if-ne p1, v0, :cond_0

    iget-object v0, p0, Lnet/tsapps/topdeals/b/k;->e:Landroid/content/DialogInterface$OnClickListener;

    const/4 v1, 0x0

    invoke-interface {v0, p0, v1}, Landroid/content/DialogInterface$OnClickListener;->onClick(Landroid/content/DialogInterface;I)V

    invoke-virtual {p0}, Lnet/tsapps/topdeals/b/k;->dismiss()V

    :cond_0
    return-void
.end method
